package com.stark.wechat.service.menu.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 图文消息展示素材按钮
 *
 * @author <a href="mengbin@eastsoft.com.cn">Ben</a>
 * @version 1.0.0
 * @since 2025/8/6
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ViewLimitedButton implements Button {

    private static final long serialVersionUID = -8705269387076383737L;

    /**
     * 菜单的响应动作类型（与 sub_button 互斥）
     */
    private final ButtonType type = ButtonType.view_limited;

    /**
     * 菜单标题，不超过16个字节，子菜单不超过60个字节
     */
    private String name;

    /**
     * 调用新增永久素材接口返回的合法media_id。media_id类型和view_limited类型必须
     */
    @JsonProperty("media_id")
    private String mediaId;

}
